# -*- coding: utf-8 -*-
"""
 @Time    : 2021/1/27 下午2:33
 @Author  : tgy
 
"""
from itertools import islice, dropwhile
import os

def read(path):
    ...
    if not os.path.exists(path):
        return
    with open(path, mode='rt', encoding='utf-8') as f:
        ...
        f = dropwhile(lambda x:x.startswith(('#',' @','"""')),f)
        # for line in f:
        #     print(line)
        for line in islice(f, 10):
            print(line)


if __name__ == '__main__':
    ...
    read('./for_obj.py')
